﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MvcWiki.Model;

namespace MvcWiki.User
{
    public class WikiUserProviderBase : IWikiUserProvider
    {
        public virtual bool CanCreateNamespace()
        {
            return true;
        }

        public virtual bool CanIndexNamespaces()
        {
            return true;
        }

        public virtual bool CanEditNamespace(WikiNamespace wikiNamespace)
        {
            if (wikiNamespace == null)
            {
                throw new ArgumentNullException("wikiNamespace");
            }

            return true;
        }

        public virtual bool CanViewNamespace(WikiNamespace wikiNamespace)
        {
            if (wikiNamespace == null)
            {
                throw new ArgumentNullException("wikiNamespace");
            }

            return true;
        }

        public virtual bool CanDeleteNamespace(WikiNamespace wikiNamespace)
        {
            if (wikiNamespace == null)
            {
                throw new ArgumentNullException("wikiNamespace");
            }

            return true;
        }

        public virtual bool CanCreatePage()
        {
            return true;
        }

        public virtual bool CanIndexPages(WikiNamespace wikiNamespace)
        {
            if (wikiNamespace == null)
            {
                throw new ArgumentNullException("wikiNamespace");
            }

            return true;
        }

        public virtual bool CanEditPage(WikiPage wikiPage)
        {
            if (wikiPage == null)
            {
                throw new ArgumentNullException("wikiPage");
            }

            return true;
        }

        public virtual bool CanViewPage(WikiPage wikiPage)
        {
            if (wikiPage == null)
            {
                throw new ArgumentNullException("wikiPage");
            }

            return true;
        }

        public virtual bool CanDeletePage(WikiPage wikiPage)
        {
            if (wikiPage == null)
            {
                throw new ArgumentNullException("wikiPage");
            }

            return true;
        }
    }
}
